/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cr.co.tse.padronelectoral.win;

import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.JFrame;

/**
 * Splash Frame
 * @author jsanca
 */
public class SplashFrame extends JFrame {

   private BufferedImage  image;


    public SplashFrame() {

        super("Padron electoral");
        SplashPanel panel = null;
        
        try {

            this.image = ImageIO.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("scpe_inicio.png"));
            if (null != this.image) {

                panel = new SplashPanel(this.image);
              
                this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                this.setUndecorated(true);

                this.getContentPane().add(panel);

                this.setSize(this.image.getWidth(), this.image.getHeight());
                
                this.setResizable(false);

                
            }
        } catch (IOException ex) {
            Logger.getLogger(SplashFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
    } // SplashFrame.


   
} // SplashFrame.
